#include <catch2/catch.hpp>

#include "solution.hpp"

TEST_CASE("287_find_the_duplicate_number", "[287]") {
    CHECK(Solution().findDuplicate({1,3,4,2,2}) == 2);
    CHECK(Solution().findDuplicate({3,1,3,4,2}) == 3);
    CHECK(Solution().findDuplicate({1,1})       == 1);
    CHECK(Solution().findDuplicate({1,1,2})     == 1);
}
